from abc import ABC, abstractmethod
from typing import List, Dict
from datetime import datetime
import pandas as pd
from core.models import Order

class PlatformAdapter(ABC):
    """平台适配器接口"""
    
    @abstractmethod
    def convert_to_orders(self, raw_data: pd.DataFrame) -> List[Order]:
        """将平台原始数据转换为标准订单格式"""
        pass
    
    @abstractmethod
    def get_symbol_multiplier(self, symbol: str) -> float:
        """获取品种的乘数"""
        pass
    
    @abstractmethod
    def get_session(self, dt: datetime) -> str:
        """根据时间判断交易时段"""
        pass 